package com.example.goodog.customViews;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Parcelable;
import android.view.View;

import com.example.goodog.R;
import com.example.goodog.activities.UserActivity;
import com.example.goodog.activities.WizardActivity;
import com.example.goodog.interfaces.IShowEditButton;

public class EditButton extends ListViewButton {

	Context context;
	public EditButton(Context c,final IShowEditButton item, final int CommandID) {
		super(c, R.drawable.edit);
		context = c;
		
		this.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {      
				Intent intent = new Intent(context, WizardActivity.class);
				intent.putExtra("wizard", UserActivity.EDIT_DOG_WIZARD);
				intent.putExtra("item", (Parcelable)item);
				((Activity)(v.getContext())).startActivityForResult(intent, CommandID);
			}
		});
		
	}

}
